<extend name="Public/base"/>
<block name="body">
    <div class="portlet box green">
        <div class="portlet-title">
            <div class="caption"><i class="fa fa-reorder"></i>年级成绩管理</div>
            <div class="tools"><a href="javascript:;" class="collapse"></a><a href="javascript:;" class="remove"></a></div>
        </div>

        <div class="portlet-body">
            <div class="table-toolbar">
                <div class="btn-group">
                    <a class="btn green " href="{:U('User/addExamination?gid='.$_GET[gid])}">发布考试</a>
                </div>
                <div class="btn-group pull-right">
                    <a class="btn green yellow-stripe"><i class="fa fa-tag"></i> 2016级</a>
                    <button class="btn btn-default">班级数：70人</button>
                    <button class="btn btn-default">学生数：30人</button>
                    <button class="btn btn-default">平均人数：40人</button>
                </div>
            </div>

                <div class="table-responsive">
                    <table class="table table-bordered table-hover table-striped">
                        <thead>
                        <tr>
                            <th width="20" class="table-checkbox"><input type="checkbox" class="check-all" /></th>
                            <th width="60">编号</th>
                            <th>考试名称</th>
                            <th>考试类别</th>
                            <th>考试难度</th>
                            <th >考试时间</th>
                            <th>管理</th>
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="_list" id="vo">
                        <tr>
                            <td><input class="ids checkboxes" type="checkbox" name="id[]" value=""></td>
                            <td>{$vo.eid}</td>
                            <td>{$vo.exam_name}</td>
                            <td>{$vo.exam_category}</td>
                            <td>{$vo.exam_difficulty}</td>
                            <td >{$vo.exam_time}</td>
                            <td>
                                <a target="_blank" onclick="funsy('{$vo.exam_name}',{$vo.eid})" href="{:U('Database/excel_form?sheet='.C('CLASS_PERF_INFO').'&excel_name=导入'.$vo['exam_name'].'成绩')}" class="label label-sm label-danger">成绩导入</a>
                                <a href="{:U('User/gradeAnalyze')}" class="label label-sm label-success">成绩分析</a>
                                <a href="" class="label label-sm label-info">成绩管理</a>
                            </td>
                        </tr>
                        </volist>
                        </tbody>
                    </table>
                    <div class="page">{$_page}</div>
                </div>
            </div>
            <div class="clearfix"></div>
    </div>

    <div class="modal" id="basic" style="display: none;background:rgba(0,0,0,0.5)!important;" >
        <div class="modal-dialog modal-wide">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close closes" data-dismiss="modal" aria-hidden="true"></button>
                    <h4 class="modal-title text-center" id="shee_title">年级成绩考试信息导入</h4>
                </div>
                <div class="modal-body">
                    请务必确认数据已填写到弹出的excel里面【科目按照表格的表头填写正确】，数据填写或粘贴后请刷新页面重复确认无误后，再点击下方的【确定导入】按钮！
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn default closes" >关闭</button>
                    <a id="daoru" class="confirm ajax-get" href=""><button type="button" class="btn blue">确定导入</button></a>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
</block>

<block name="script">

    <script src="__STATIC__/scripts/app.js"></script>
    <script src="__STATIC__/scripts/table-managed.js"></script>
    <script>
        jQuery(document).ready(function() {
            App.init();
            TableManaged.init();
            highlight_subnav('{:U('User/gradeInformation')}');
        });

        function funsy(name,eid,sheetid){
            var p_url="{:U('ExcelOut/into_class_result')}?eid="+eid+'&sheetid=2';
            $("#daoru").attr('href',p_url);
            $("#shee_title").html('年级'+name+'成绩信息导入');
            $("#basic").show();
        }
        $("#daoru").click(function(){
            $("#basic").hide();
        })

        $(".closes").click(function(){
            $("#basic").hide();
        })
    </script>
</block>